package com.gemfire.onlineretailer.domain;

/**
 * Taken from the HR system this POJO represent the Employees who receive payment for their authorized expenses.
 * 
 *  
 * @author Binit Datta
 */

import java.io.Serializable;

public class Employee implements Serializable {
	  private static final long serialVersionUID = 1L;
	  
	  public static final long EMPLOYEE_1 = 10000001;
	  public static final long EMPLOYEE_2 = 10000002;

	  public static final long EMPLOYEE_3 = 10000003;
	  public static final long EMPLOYEE_4 = 10000004;
	  public static final long EMPLOYEE_5 = 10000005;
	  
	  public static final String EMPLOYEE_1_CODE = "10000001";
	  public static final String EMPLOYEE_2_CODE = "10000002";

	  public static final String EMPLOYEE_3_CODE = "10000003";
	  public static final String EMPLOYEE_4_CODE = "10000004";
	  public static final String EMPLOYEE_5_CODE = "10000005";

	  
	  private long employeeId;
	  private String employeeCode;
	  private int employeeType;
	  private String employeeFirstName;
	  private String employeeMiddleName;
	  private String employeeLastName;
	  private String emailpyeeEmailAddress;
	  private Address employeeMailingAddress;
	  private String employeeHomePhone;
	  private String emplyoyeeCellPhone;
	  private int employeeSSN;
	  
	public int getEmployeeSSN() {
		return employeeSSN;
	}
	public void setEmployeeSSN(int employeeSSN) {
		this.employeeSSN = employeeSSN;
	}
	public long getEmployeeId() {
		return employeeId;
	}
	public void setEmployeeId(long employeeId) {
		this.employeeId = employeeId;
	}
	
	public int getEmployeeType() {
		return employeeType;
	}
	public void setEmployeeType(int employeeType) {
		this.employeeType = employeeType;
	}
	
	public String getEmployeeCode() {
		return employeeCode;
	}
	public void setEmployeeCode(String employeeCode) {
		this.employeeCode = employeeCode;
	}
	public String getEmployeeFirstName() {
		return employeeFirstName;
	}
	public void setEmployeeFirstName(String employeeFirstName) {
		this.employeeFirstName = employeeFirstName;
	}
	public String getEmployeeMiddleName() {
		return employeeMiddleName;
	}
	public void setEmployeeMiddleName(String employeeMiddleName) {
		this.employeeMiddleName = employeeMiddleName;
	}
	public String getEmployeeLastName() {
		return employeeLastName;
	}
	public void setEmployeeLastName(String employeeLastName) {
		this.employeeLastName = employeeLastName;
	}
	public String getEmailpyeeEmailAddress() {
		return emailpyeeEmailAddress;
	}
	public void setEmailpyeeEmailAddress(String emailpyeeEmailAddress) {
		this.emailpyeeEmailAddress = emailpyeeEmailAddress;
	}
	public Address getEmployeeMailingAddress() {
		return employeeMailingAddress;
	}
	public void setEmployeeMailingAddress(Address employeeMailingAddress) {
		this.employeeMailingAddress = employeeMailingAddress;
	}
	public String getEmployeeHomePhone() {
		return employeeHomePhone;
	}
	public void setEmployeeHomePhone(String employeeHomePhone) {
		this.employeeHomePhone = employeeHomePhone;
	}
	public String getEmplyoyeeCellPhone() {
		return emplyoyeeCellPhone;
	}
	public void setEmplyoyeeCellPhone(String emplyoyeeCellPhone) {
		this.emplyoyeeCellPhone = emplyoyeeCellPhone;
	}
	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	
	public static Employee createInstance(long employeeId){
		
		/*
		 * Use employeeId to read from DB or from other source, Hardcode for now
		 */
		
		Employee emp = new Employee();
		
		if (employeeId == EMPLOYEE_1){
			emp.setEmployeeId(employeeId);
			emp.setEmployeeCode(EMPLOYEE_1_CODE);
			emp.setEmployeeType(EmployeeType.SALIRED.getCode()); 
			emp.setEmployeeFirstName("Alan");
			emp.setEmployeeLastName("Sanford");
		} 
		else if (employeeId == EMPLOYEE_2){
			emp.setEmployeeId(employeeId);
			emp.setEmployeeType(EmployeeType.SALIRED.getCode()); 
			emp.setEmployeeCode(EMPLOYEE_2_CODE);
			emp.setEmployeeFirstName("Roger");
			emp.setEmployeeLastName("Federar");
		} 
		else if (employeeId == EMPLOYEE_3){
			emp.setEmployeeId(employeeId);
			emp.setEmployeeType(EmployeeType.SALIRED.getCode()); 
			emp.setEmployeeCode(EMPLOYEE_3_CODE);
			emp.setEmployeeFirstName("Novak");
			emp.setEmployeeLastName("DJokovic");
		} 
		else if (employeeId == EMPLOYEE_4){
			emp.setEmployeeId(employeeId);
			emp.setEmployeeType(EmployeeType.SALIRED.getCode()); 
			emp.setEmployeeCode(EMPLOYEE_4_CODE);
			emp.setEmployeeFirstName("Steffi");
			emp.setEmployeeLastName("Graf");
		}
		else {
				emp.setEmployeeId(employeeId);
				emp.setEmployeeType(EmployeeType.SALIRED.getCode()); 
				emp.setEmployeeCode(EMPLOYEE_5_CODE);
				emp.setEmployeeFirstName("Maria");
				emp.setEmployeeLastName("Sharapova");
			} 
		
		return emp;
		
	}

}
